/**
 * @ClassName LC2529
 * @Author ykx
 * @Date 2024/7/13 10:38
 * @Version 1.0
 */
public class LC2529 {
    public int maximumCount(int[] nums) {
        int pos = 0, neg = 0;
        for (int i = 0; i < nums.length; i++) {
            if (nums[i] < 0) {
                neg++;
            } else if (nums[i] > 0) {
                pos = nums.length - i;
                break;
            }
        }
        return Math.max(pos, neg);
    }
}
